def remainders(x:Int) :List[Int] =
    List.range(2, x) map ( (y) => x % y)

//def isPrime(x:Int) : Boolean = List.range(2, x -1)
println(List.range(2, 10 ))
println(remainders(10))